<template>
    <VAssetsTypeContent title="资产类目编辑" :id="id" :flat="flat"></VAssetsTypeContent>
</template>
<script setup lang="ts">
import { watch } from 'vue'
import { ref } from 'vue'
import { useRoute } from 'vue-router'
import VAssetsTypeContent from './AssetsTypeContent.vue'

const route = useRoute()
const id = ref()
const flat = ref()
watch(
    () => route,
    async () => {
        if (route.path == '/OA/AssetsManagement/AssetsType/AssetsTypeUpdate' && route.query.id) {
            id.value = route.query.id
            flat.value = route.query.flat || false
        }
    },
    { deep: true, immediate: true }
)
</script>
<style scoped lang="scss"></style>
  